]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
remoteAccess: Ignore all but the screen record handles on X11
authorJonas Ådahl <jadahl@gmail.com>
Tue, 13 Oct 2020 14:28:51 +0000 (16:28 +0200)
committerFlorian Müllner <fmuellner@gnome.org>
Tue, 13 Oct 2020 21:45:59 +0000 (21:45 +0000)
We still want to show the red dot when recording the screen on X11, so
only drop the "screen-is-shared" handles when using the X11 session.

Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/3279
https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1466

js/ui/status/remoteAccess.js

index feafe61550229296d67b387662ccd73f04be35a4..21f6581b61707b7d62d76595dbbc6637d0fd2e61 100644 (file)
@@ -16,13 +16,6 @@ class RemoteAccessApplet extends PanelMenu.SystemIndicator {
         if (!controller)
             return;
 
-        // We can't possibly know about all types of screen sharing on X11, so
-        // showing these controls on X11 might give a false sense of security.
-        // Thus, only enable these controls when using Wayland, where we are
-        // in control of sharing.
-        if (!Meta.is_wayland_compositor())
-            return;
-
         this._handles = new Set();
         this._sharedIndicator = null;
         this._recordingIndicator = null;
@@ -85,6 +78,16 @@ class RemoteAccessApplet extends PanelMenu.SystemIndicator {
     }
 
     _onNewHandle(handle) {
+        // We can't possibly know about all types of screen sharing on X11, so
+        // showing these controls on X11 might give a false sense of security.
+        // Thus, only enable these controls when using Wayland, where we are
+        // in control of sharing.
+        //
+        // We still want to show screen recordings though, to indicate when
+        // the built in screen recorder is active, no matter the session type.
+        if (!Meta.is_wayland_compositor() && !handle.is_recording)
+            return;
+
         this._handles.add(handle);
         handle.connect('stopped', this._onStopped.bind(this));